/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.google.code.jmarias.server;
import java.util.*;
import com.google.code.jmarias.common.*;

/**
 * komparator slouzici k razeni karet v ruce
 * @author josef
 */
public class CardComparator implements Comparator<Card> {
    public int compare(Card argA, Card argB) {
        if (argA.getSuit() != argB.getSuit()) {
            return argA.getSuit().ordinal() - argB.getSuit().ordinal();
        } else {
            return argA.getValue().ordinal() - argB.getValue().ordinal();
        }
    }
}
